package com.holdtime.jtt809.taxi.module.entity.mapper;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.holdtime.jtt809.taxi.module.entity.PlatformLoginLogDO;
import com.holdtime.jtt809.taxi.module.model.vo.PlatformLoginLogPageReqVO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 下级平台登陆日志 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface PlatformLoginLogMapper extends BaseMapperX<PlatformLoginLogDO> {

    default PageResult<PlatformLoginLogDO> selectPage(PlatformLoginLogPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<PlatformLoginLogDO>()
                .eqIfPresent(PlatformLoginLogDO::getDlsj, reqVO.getDlsj())
                .eqIfPresent(PlatformLoginLogDO::getPfGnsscenterid, reqVO.getPfGnsscenterid())
                .eqIfPresent(PlatformLoginLogDO::getUserid, reqVO.getUserid())
                .eqIfPresent(PlatformLoginLogDO::getPassword, reqVO.getPassword())
                .eqIfPresent(PlatformLoginLogDO::getLinkIp, reqVO.getLinkIp())
                .eqIfPresent(PlatformLoginLogDO::getResult, reqVO.getResult())
                .eqIfPresent(PlatformLoginLogDO::getVerifyCode, reqVO.getVerifyCode())
                .betweenIfPresent(PlatformLoginLogDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(PlatformLoginLogDO::getId));
    }

}